/*
  The globals.c file defines some global variables
*/

#include <types.h>
#include <globals.h>


/* Global variables */

extern dword_t _KERNEL_START,_KERNEL_DATAEND,_KERNEL_END;  /* Symbols indicating start and end of kernel (definded in the linker script) */

dword_t Kernel_Start=0,Kernel_DataEnd=0,Kernel_End=0;  /* these ones are the public variables for kernel size */


// memory information
dword_t mem_lower,mem_upper,mem_tot;
byte_t mmap_valid;

// count how many times kernel is entered
volatile dword_t kernel_entering_count = -1;


/* Functions */

void globalVars_Initialize(void)
  {
    // Initialize kernel pointers to know beginning and end of it
    Kernel_Start=(dword_t)&_KERNEL_START;
    Kernel_DataEnd=(dword_t)&_KERNEL_DATAEND;
    Kernel_End=(dword_t)&_KERNEL_END;
  }


